Skip to content

Offer Mastra when adding a Bot or an agent - #1731

Merged
davidmckayv merged 2 commits into
mainfrom
feat/add-mastra-harness
Nov 16, 2026
Merged

davidmckayv merged 2 commits into
mainfrom
feat/add-mastra-harness

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What

Mastra is now offered in the framework list when adding a Bot (New Bot) or an agent (Agents, Add agent), with its mark, after Langroid.

Why it was missing

shared/harnesses.json had webCreate: false for Mastra, on purpose. A Mastra server has no AG-UI route, so the address test and the create could only treat it as an AG-UI agent, and a Mastra Bot made that way would never answer. The create now names the framework (harness: "mastra", already in the API's enum), and the server proves a Mastra address against Mastra's own API and saves it as a Mastra Bot. So the row can be offered.

What picking it does

  • Same as every other row: the address step opens with the Mastra chip, and Create makes the Bot with harness: "mastra" and "Powered by Mastra".
  • The AG-UI connection test is skipped for Mastra, since it can only fail against a Mastra server. The create carries the proof, and a refusal is shown under the address, as a failed test is.
  • The address step asks for the Mastra server's own address, and says it needs to run one agent.
  • Changing an agent that was added as Mastra skips the AG-UI test the same way.

Single-agent Mastra servers only. One with several agents is refused when it is added.

shared/harnesses.ts gains reachedThroughMastra(id). No API spec change.

Tests

  • app/tests/new-bot-sheet.test.tsx: Mastra is offered with its mark; picking it opens the address step and creates with harness: "mastra" and no AG-UI test; a refused create shows the server's sentence once, under the address. Failed before the change (no Mastra row), passes after.
  • shared/harnesses.test.ts: the web list includes Mastra, and Mastra is the one framework reached through Mastra's API.

Checked by looking

New Bot picker and Mastra address step, and the Agents page's Add agent picker and address step, in Chromium and WebKit, light and dark, at 1440 and 700 wide, against a local dev build. The Mastra mark is drawn in currentColor, so it renders black on the plain row in light mode and on the white tile in dark mode, like the other marks.

Mastra was left out of the framework list on purpose: a Mastra server has no AG-UI route, so the address test and the create could only treat it as an AG-UI agent, and a Mastra Bot made that way would never answer. The server now proves a Mastra address against Mastra's own API when the create names the framework, and saves it as a Mastra Bot.

So the list offers Mastra with its mark, after Langroid. Picking it skips the AG-UI test, which can only fail against a Mastra server, and creates straight away; what the server refused with is shown under the address. The address step asks for the Mastra server's own address. Changing an agent added as Mastra skips the AG-UI test the same way.

Single-agent Mastra servers only: one with several agents is refused when it is added.
@davidmckayv
davidmckayv merged commit 9b37342 into main Nov 16, 2026
20 checks passed
@davidmckayv
davidmckayv deleted the feat/add-mastra-harness branch November 16, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant